namespace SideShow.Driver.ComInterop
{
    using System;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;

    #pragma warning disable 0108
    
    [ComImport, Guid("CC060D79-C0C2-407F-8B10-A5E900FC3474"), TypeLibType((short) 0x200), InterfaceType((short) 1)]
    public interface IWDFIoTarget : IWDFObject
    {
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void DeleteWdfObject();
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void AssignContext([In, MarshalAs(UnmanagedType.Interface)] IObjectCleanup pCleanupCallback, [In] IntPtr pContext);
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void RetrieveContext(out IntPtr ppvContext);
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void AcquireLock();
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void ReleaseLock();
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void GetTargetFile([MarshalAs(UnmanagedType.Interface)] out IWDFFile ppWdfFile);
        [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void CancelSentRequestsForFile([In, MarshalAs(UnmanagedType.Interface)] IWDFFile pFile);
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void FormatRequestForRead([In, MarshalAs(UnmanagedType.Interface)] IWDFIoRequest pRequest, [In, MarshalAs(UnmanagedType.Interface)] IWDFFile pFile, [In, MarshalAs(UnmanagedType.Interface)] IWDFMemory pOutputMemory, [In] ref _WDFMEMORY_OFFSET pOutputMemoryOffset, [In] ref long DeviceOffset);
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void FormatRequestForWrite([In, MarshalAs(UnmanagedType.Interface)] IWDFIoRequest pRequest, [In, MarshalAs(UnmanagedType.Interface)] IWDFFile pFile, [In, MarshalAs(UnmanagedType.Interface)] IWDFMemory pInputMemory, [In] ref _WDFMEMORY_OFFSET pInputMemoryOffset, [In] ref long DeviceOffset);
        [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
        void FormatRequestForIoctl([In, MarshalAs(UnmanagedType.Interface)] IWDFIoRequest pRequest, [In] uint IoctlCode, [In, MarshalAs(UnmanagedType.Interface)] IWDFFile pFile, [In, MarshalAs(UnmanagedType.Interface)] IWDFMemory pInputMemory, [In] ref _WDFMEMORY_OFFSET pInputMemoryOffset, [In, MarshalAs(UnmanagedType.Interface)] IWDFMemory pOutputMemory, [In] ref _WDFMEMORY_OFFSET pOutputMemoryOffset);
    }
}

